package com.gpframework.module.common.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gpframework.module.common.domain.CommonLabel;
import com.gpframework.module.common.domain.req.CommonLabelReq;
import com.gpframework.module.common.domain.vo.CommonLabelVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName CommonLabel
 * @Author gpframework
 * @Date 2022-04-07
 * @Version 1.0.0
 * @Description 标签Mapper接口
 */
public interface CommonLabelMapper extends BaseMapper<CommonLabel> {

    /**
     * 列表
     *
     * @param lqw
     * @return
     */
    List<CommonLabelVo> listVo(@Param("ew") QueryWrapper<CommonLabel> lqw);

    /**
     * 对象
     *
     * @param id
     * @return
     */
    CommonLabelVo getVo(@Param("id") Long id);

    /**
     * 获取门店标签
     *
     * @param labelReq
     * @return
     */
    List<CommonLabelVo> getStoreLabel(CommonLabelReq labelReq);

    /**
     * 获取用户标签List
     *
     * @param wxUserId
     * @return
     */
    List<CommonLabelVo> getUserLabelList(Long wxUserId);

    /**
     * 获取用户标签List
     *
     * @param wxUserId
     * @return
     */
    List<CommonLabelVo> getUserLabelListByStorId(@Param("wxUserId") Long wxUserId, @Param("storeId") Long storeId);

    /**
     * 获取课程标签List
     *
     * @param courseId 课程id
     * @return
     */
    List<CommonLabelVo> getCourseLabelList(Long courseId);

    /**
     * 统计标签类型数量
     *
     * @param labelReq
     * @return
     */
    int countLabelBusinessType(CommonLabelReq labelReq);
}
